<template>
	<view class="content">
		<text>index-首页 - {{title}}</text>
		
		<!-- #ifdef H5 -->
		<text>这是仅H5可见的元素1</text>
		<text>这是仅H5可见的元素2</text>
		<!-- #endif -->
		
		<!-- #ifdef APP -->
		<text>这是仅App可见的内容1</text>
		<text>这是仅App可见的内容2</text>
		<text>这是仅App可见的内容3</text>
		<!-- #endif -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello2'
			}
		},
		onLoad() {		//生命周期方法：组件加载完成
			// #ifdef H5
			this.title = '我是H5'
			// #endif
			
			// #ifdef APP
			this.title = '我是APP'
			// #endif
		}
	}
</script>

<style>
	text {
		/* #ifdef H5 */
		color: red;
		/* #endif */
		
		/* #ifdef APP */
		color: blue;
		/* #endif */
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
